﻿/*
Copyright © 2010 François Karman

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

See <license.txt> for the complete license of the software.
*/

using Microsoft.Build.Framework;

namespace Ghost.Tasks.Hg
{
    /// <summary>
    /// Removes somes files of the repository on the next commit.
    /// </summary>
    [Command("remove")]
    public class HgRemove : AbstractHgTask
    {
        /// <summary>
        /// Gets or sets a value indicating whether only the files
        /// already deleted (missing) should be removed.
        /// </summary>
        [Parameter("-A")]
        public bool After { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the remove should be forced
        /// even if the files have just been added or modified.
        /// </summary>
        [Parameter("-f")]
        public bool Force { get; set; }

        /// <summary>
        /// Gets or sets the inclusion pattern.
        /// </summary>
        [Parameter("-I")]
        public string Include { get; set; }

        /// <summary>
        /// Gets or sets the exclusion pattern.
        /// </summary>
        [Parameter("-X")]
        public string Exclude { get; set; }

        /// <summary>
        /// Gets or sets the files to add in the source control
        /// on the next commit.
        /// </summary>
        [Required]
        [Parameter("")]
        public ITaskItem[] Files { get; set; }
    }
}
